mcN = "letter"; alphaSpeed = Math.floor((100 - alpha) / ((scale-100)/speed)); aLetters = new Array(); for (i = 0; i< numChar; i++){ aLetters[i+0] = i; var letter = this[mcN +i]; letter._visible = true; letter.init = letterInit; letter.doEffect = effect; letter.number = i; } function letterInit() { if (this.timerStarted == 1) { } else { this.timerStarted = 0; } this._visible = true; this.speed = this._parent.speed; this.alphaSpeed = this._parent.alphaSpeed; } function effect() { if (this.timerStarted == 0) { this.start = getTimer(); this.timerStarted = 1; this.gotoAndPlay(3); } else { if (getTimer() > (this.start + this._parent.startDelay)){ this._xscale += this.speed; this._yscale += this.speed; this._alpha -= this.alphaSpeed; if (this._xscale >= this._parent.scale) { this.gotoAndStop("end"); this._alpha = 100; this._xscale = 100; this._yscale = 100; this._visible = false; this.timerStarted = 0; } }else{ this.gotoAndPlay(3); } } } function shuffle(){ return Math.floor(Math.random() * 3) -1; } if (random == 1){ aLetters.sort(shuffle); } if (reverse == 1){ aLetters.reverse(); }